﻿using RAP.Framework.Libary.DomTemplateBuilder.Attributes;
using RAP.Framework.Libary.DomTemplateBuilder.Handler.StringActions;
using RAP.Framework.Libary.Utils;

namespace RAP.Framework.Libary.DomTemplateBuilder.Element.StringActions
{
    /// <summary>
    /// 替换字符串
    /// </summary>
    [TagHandler( "String.Replace", typeof( StringReplaceHandler ) )]
    public class StringReplace : StringActionItem
    {
        /// <summary>
        /// 要搜索的字符串或表达式
        /// </summary>
        public string Find
        {
            get
            {
                return this.ToString ( "Find" );
            }
        }

        /// <summary>
        /// 要替换的字符串或表达式
        /// </summary>
        public string Replace
        {
            get
            {
                return this.ToString ( "Replace" );
            }
        }
    }
}
